Milestone 7 - The Symbol Table
Objectives
The objectives of this assignment are
- the inclusion of a complete symbol table in your compiler
- design and implementation of a method that can be called at any point in your parser to print the entire stack of symbol tables
To Do
- Freeze your current parser in your revision control system and begin working on a copy. This will allow us to test your parser without any symbol table code.
- Complete a symbol table ADT for your compiler.
- Modify the LL(1) grammar for mPascal so that it includes action symbols (to be covered in class) where appropriate to cause identifiers, including procedure, function, and parameter declarations and their attributes to be inserted into the symbol table at declaration time.
- The action symbols you insert into the mPascal grammar for the insertion of identifiers into the symbol table are to become calls inserted into your parser to corresponding methods in your symbol table ADT.
- Modify the parser to include calls to the action methods to insert identifiers and their attributes into the symbol table. If an error occurs (e.g., an identifier has been declared multiple times), your compiler should terminate with a useful error message about what happened and where.
To Turn In
Be ready to demo your frozen parser in class. Be ready to show how far you have come with the symbol table, too.